import java.util.Scanner;
/**
 * Created with IntelliJ IDEA.
 * Description:matches()方法对输入的字符串与正则表达式进行正则匹配
 */
public class TestDemo {
    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        String emailMatcher="[a-zA-Z0-9]+@[a-zA-Z0-9]+\\.[a-zA-Z0-9]+";

        //write your code here......
        if(str.matches(emailMatcher)){
            System.out.println("邮箱格式合法");
        }else{
            System.out.println("邮箱格式不合法");
        }
    }
}
